package com.yourPet.springMVCTest;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.AbstractController;

import com.yourPet.springMVCTest.beans.Emp;

public class EmpController1 extends AbstractController {

	@Override
	protected ModelAndView handleRequestInternal(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		String name = request.getParameter("name");
		String phone = request.getParameter("phone");
		Emp emp = new Emp();
		emp.setName(name);
		emp.setPhone(Integer.parseInt(phone));
		//service.addEmp(emp);
		System.out.println(emp);
		return null;
	}

}
